package com.itlong.cloud.operate.resource;

import com.itlong.cloud.POJO.DTO.operate.OperateAmountChangeGetPageDTO;
import com.itlong.cloud.POJO.VO.operate.OperateAmountChangeGetPageVO;
import com.itlong.cloud.operate.service.IOperateAmountChangeService;
import com.itlong.cloud.paymenthub.IOperateAmountChangeClient;
import com.itlong.cloud.utils.page.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <desc>
 *      运营-资金变动明细暴露接口实现类
 * <desc/>
 *
 * @createDate 2018/09/21
 */
@RestController
public class OperateAmountChangeResource implements IOperateAmountChangeClient {

    @Autowired
    private IOperateAmountChangeService iOperateAmountChangeService;

    /**
     * <desc>
     *      分页获取资金变动明细
     * </desc>
     *
     * @param operateAmountChangeGetPageDTO 资金变动明细列表查询DTO
     * @return 分页结果
     * @author wangzhi
     * @createDate 2018/09/21
     */
    @Override
    @PostMapping(path = "/operate/amountChangeManage/getPage")
    public Page<OperateAmountChangeGetPageVO> getPage(@RequestBody OperateAmountChangeGetPageDTO operateAmountChangeGetPageDTO) throws Exception {
        return iOperateAmountChangeService.getPage(operateAmountChangeGetPageDTO);
    }

    /**
     * <desc>
     *      获取所有资金变动明细列表
     * </desc>
     *
     * @param operateAmountChangeGetPageDTO 资金变动明细列表查询DTO
     * @return 结果集
     * @author wangzhi
     * @createDate 2018/09/21
     */
    @Override
    @PostMapping(path = "/operate/amountChangeManage/getAllAmountChangeList")
    public List<OperateAmountChangeGetPageVO> getAllAmountChangeList(@RequestBody OperateAmountChangeGetPageDTO operateAmountChangeGetPageDTO) throws Exception {
        return iOperateAmountChangeService.getAllAmountChangeList(operateAmountChangeGetPageDTO);
    }
}
